1. Field of Invention
The invention relates to a control system and a control method of a virtual memory and, more particularly, to a control system and a control method adapted for a virtual memory of a solid state disk (SSD).
2. Related Art
Nowadays, architectures of all general purpose computers belong to store-program computers. That is, the store-program computer loads instructions (basic elements of programs) to an interior storage space and then executes the instructions in the interior storage space.
In the computer, a storage unit used for storing is generally divided into two types, a volatile storage unit and a non-volatile storage unit. The volatile storage unit may be a cache memory or a random access memory (RAM), and the data stored in the volatile storage unit disappears after the computer is powered off. The non-volatile storage unit may be a disk-type hard disk (called hard disk for short hereafter), and the data stored in the non-volatile storage unit remains after the computer is powered off. The two types of the storage units have different functions. Generally speaking, since access speeds of the cache memory and the RAM are quick, the cache memory and the RAM may be used for executing programs. Since the access speed of the hard disk is relatively slow, the hard disk is adapted for storing programs and data.
However, since application programs which have to be executed in the computer are more and more, to make the memory have enough space to execute the application programs, a virtual memory is developed. The virtual memory technology combines the memory and the hard disk to expand capacity of the memory in the computer. In the computer, a memory management unit (MMU) is usually utilized to make the virtual memory, and it uses part of the hard disk as the memory.
The access of the hard disk has to be done by moving an access arm, rotating the disk, and reading and writing via read-write head, and thus the access speed of the hard disk is relatively slow. Since conventional hard disks have mechanism parts such as a disk, shock resistance has to be strengthened. Thus, a SSD is developed presently.
The SSD is the storage unit basing on the permanent storage units (such as a flash memory) or a non-permanent storage unit (such as a synchronous dynamic random access memory (SDRAM)). Since the SSD does not have the mechanism parts such as the access arm and the disk, the SSD has advantages such as low power consumption, no noise, and high shock resistance. However, the flash memory or the SDRAM has a certain reading lifetime (a limited number of times of reading), and when the lifetime is reached, the data stored therein cannot be read.
In the computer equipped with the SSD, if the virtual memory is turned on, the reading and writing are continuously performed to the SSD, which shortens the lifetime of the SSD. However, if the virtual memory is not turned on, some application programs cannot be opened.